<template>
  <div id="app">
    <div class="layout">
      <div class="header" onmousedown="DropMoveCall()">
        <div class="bg-ani"></div>
        <div id="title" style="display:inline-block;font-size:16px;">
          御龙 RUST
          </div>
        <div id="userinfo" v-if="userinfo">
          <el-avatar :size="30" icon="el-icon-user-solid"></el-avatar>
          <div style="font-size:12px;padding:0 10px;">
            <el-tag>{{userinfo.username}}</el-tag>
          </div>
          <el-button size="mini" @click="()=>{this.$store.commit('SET_LOGOUT'),this.$router.push({ name: 'Login' })}">退出登录</el-button>
        </div>
        <!-- <div id="win-button">
          <div id="item" onclick="winMin()" style="position:relative;top:-2px;" title="最小化">0</div>
          <div id="item" onclick="winClose()" title="关闭">r</div>
        </div> -->
      </div>
      <div class="content">
        <!-- <div class="rcon-menu">
          
        </div> -->
        <div class="content-view">
          <router-view />
        </div>
      </div>
    </div>

  </div>
</template>
<script>
export default {
  data() {
    return {

    }
  },
  computed:{
    userinfo(){
      // console.warn(localStorage.getItem('userinfo'))
      return this.$store.getters.GET_USERINFO
    }
  },
  created: function () {
    this.$API.interceptors(this.$router)
  },
  methods: {

  },
  components: {

  }
}
</script>
<style lang="less">
@keyframes logo-ani {
  0% {
    opacity: 0.9;
    transform: translate(300px, -15px) scale(1.2);
  }
  5% {
    opacity: 0.9;
    transform: translate(300px, -20px) scale(1.2);
  }
  10% {
    opacity: 0.9;
    transform: translate(300px, -15px) scale(1.2);
  }
  15% {
    opacity: 0.9;
    transform: translate(300px, -20px) scale(1.2);
  }
  20% {
    opacity: 0.9;
    transform: translate(300px, -15px) scale(1.2);
  }
  25% {
    opacity: 0.9;
    transform: translate(300px, -20px) scale(1.2);
  }
  30% {
    opacity: 0.9;
    transform: translate(300px, -15px) scale(1.2);
  }
  50% {
    transform: none;
    opacity: 0.2;
  }
  100% {
    transform: none;
    opacity: 0.2;
  }
}
.bg-ani {
  animation: logo-ani 8s infinite alternate;
  position: absolute;
  background-repeat: no-repeat;
  background-image: url(assets/2022bg.png);
  background-size: 100%;
  height: 80px;
  width: 150px;
}
#app {
  background: #f1f1f1;
  height: 100%;
  overflow: hidden;
  // border-radius: 4px;
  // font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // text-align: center;
  // box-shadow: 1px 1px 6px 3px rgba(0, 0, 0, 0.1);
  color: rgb(144, 147, 153);
}
#win-button {
  display: flex;
  #item {
    cursor: pointer;
    font-weight: 400;
    // background: red;
    color: rgba(0, 0, 0, 0.6);
    padding: 0 10px;
    font-family: Webdings;
    transition: 0.3s;
    &:hover {
      color: rgba(0, 0, 0, 0.2);
    }
  }
}
.layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  .header {
    overflow: hidden;
    position: relative;
    color: #fff;
    // background:linear-gradient(170deg,#2fdab2,#fff 70%);
    background: rgba(235, 187, 91,0.8);
    border-bottom: solid 1px rgba(0, 0, 0, 0.1);
    display: flex;
    height: 80px;
    line-height: 80px;
    padding: 0 10px;
    #title {
      margin-right: auto;
      // padding-right: 50px;
    }
    #userinfo {
      // width:270px;
      // justify-content:space-between;
      // margin-right: auto;
      padding-right: 50px;
      display: flex;
      align-items: center;
    }
  }
  .content {
    padding: 10px;
    flex: 1;
    display: flex;
    .rcon-menu {
      width: 200px;
    }
    .content-view {
      flex: 1;
    }
  }
}
</style>
